package may08ch14ex1MyExceptions;

public class MyExceptions {
	public static void main(String[] args) {

		Car car = null;
		try {
			doSomething(car);
		} catch (Exception e) {
			System.out.println("after catching an exception");
			// } catch (NullPointerException e) {
			e.printStackTrace();
			System.out.println("after catching nullpointerexception");
		}

		System.out.println("print me plz!!");
	}

	private static void doSomething(Car car) {
		doSomethingElse(car);

		System.out.println(car.toString());

		System.out.println("do something");
	}

	private static void doSomethingElse(Car car) {
		// System.out.println(3 / 0);
	}

}
// Throwable
// Error / Exception
// Exception:
// Runtime Exception 